-- GENERATED SPELL FOR [Dragonmaw Transporter] --


function spell0_23188(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(38861,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23188', 3000, 1)
end

function spell1_23188(pUnit, Event) --@Serpent Sting,n/a--
pUnit:FullCastSpellOnTarget(38859,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23188', 15000, 1)
end

function spell2_23188(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(38858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23188', 597, 1)
end

function Sorts_23188(pUnit, Event)
local choix_sorts_23188 = math.random(0, 2)
if choix_sorts_23188 == 0 then
pUnit:RegisterEvent('spell0_23188', 1, 1)
end
if choix_sorts_23188 == 1 then
pUnit:RegisterEvent('spell1_23188', 1, 1)
end
if choix_sorts_23188 == 2 then
pUnit:RegisterEvent('spell2_23188', 1, 1)
end
end

function mob23188_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23188', math.random(1500, 3000), 1)
end

function mob23188_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23188_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23188_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23188, 1, 'mob23188_Action')
RegisterUnitEvent(23188, 2, 'mob23188_Leave')
RegisterUnitEvent(23188, 3, 'mob23188_Kill')
RegisterUnitEvent(23188, 4, 'mob23188_Die')
